 <template>
  <div>
    <h1>{{ msg }}</h1>
    <div>
      <p>局部计算属性:{{ localComputed }}</p>
      <p>映射取值count: [{{ count }}]</p>
      <p>映射取值name: [{{ name }}]</p>
    </div>
  </div>
</template> 

<script>
import { mapState } from "vuex";
export default {
  name: "Test5",
  props: {
    msg: String,
  },
  data() {
    return {
      tempCount: 1,
    };
  },
  computed: {
    localComputed() {
      return this.tempCount + 10;
    },
    ...mapState(["count", "name"]),
  },
};
</script>
